#ifndef __MTRACER_H__
#define __MTRACER_H__
#include "tracer.h"
typedef enum
{
    LOAD,
    STORE,
} MTYPE;
typedef struct
{
    MTYPE type;
    union 
    {
        uint8_t size;
        uint8_t mask;
    };
    uint64_t addr;
    uint64_t data;
} MTracer_Data;

class MTracer : public Tracer<MTracer_Data, MTRACE_SIZE>
{
    
public:
    MTracer():Tracer("MTracer") {}
    std::string toString(MTracer_Data &data)
    {
        char temp[128];
        sprintf(temp, "%s addr:0x%016lx data:0x%016lx %s:0x%x", data.type == LOAD?"load ":"store",data.addr, data.data, data.type == LOAD?"size":"mask", data.size);
        return std::string(temp);
    }
};
extern MTracer mtracer;
#endif